import { stringify } from 'qs';
import {setParam} from '@/utils/Base';
import request from '@/utils/request';
/**
 * 
 * @param {根据条件查询数据} params 
 * 返回三维数组
 */
export async function select(params) {
    return request('/server/api/admin/v1/resource/getList', {
      method: 'POST',
      data: (Object.assign(setParam(),params))
      ,
    });
}
/**
 * 
 * @param {查询某一条数据} params 
 */
export async function find(params) {
    return request('/server/api/admin/v1/resource/getFind', {
      method: 'POST',
      data: (Object.assign(setParam(),params))
      ,
    });
}
/**
 * 
 * @param {新增一个数据} params array
 */
export async function insert(params) {
      return request('/server/api/admin/v1/resource/insert', {
        method: 'POST',
        data: (Object.assign(setParam(),params))
        ,
      });
}
/**
 * 
 * @param {修改某一个数据} params array
 */
export async function edit(params) {
      return request('/server/api/admin/v1/resource/edit', {
        method: 'POST',
        data: (Object.assign(setParam(),params))
        ,
      });
}
/**
 * 
 * @param {修改某一个数据} params array
 */
export async function setField(params) {
    return request('/server/api/admin/v1/resource/setField', {
      method: 'POST',
      data: (Object.assign(setParam(),params))
      ,
    });
}
/**
 * 
 * @param {删除某一个数据} params array
 */
export async function remove(params) {
    return request('/server/api/admin/v1/resource/delete', {
      method: 'POST',
      data: (Object.assign(setParam(),params))
      ,
    });
  }